package com.huaxin.device.dto.enums.validation;

import com.huaxin.device.dto.enums.validator.WaterproofGradeValidator;
import jakarta.validation.Constraint;
import jakarta.validation.Payload;

import java.lang.annotation.*;

@Target({ElementType.FIELD, ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Constraint(validatedBy = WaterproofGradeValidator.class)
public @interface ValidWaterproofGrade {
    String message() default "无效的防水等级，允许值：IPX0/IPX1/IPX2/IPX3/IPX4/IPX5/IPX6/IPX7/IPX8/IPX9";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}
